from django.shortcuts import render
from django.http import HttpResponse
from django.urls import reverse
from django.shortcuts import redirect

def redirect_view(request):
    url=reverse('myapp:hello_world')
    return redirect(url)

def home(request):
    return HttpResponse("Hello, Django!")

def sum(request, num1, num2):
    return HttpResponse(f"The sum is {num1 + num2}")

def post(request, post_id):
    return HttpResponse(f"You are viewing post {post_id}")

def hello_world(request):
    return HttpResponse("Hello, Django!")

def some_view(request):
    return render(request,'templates.html')

